﻿using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;

using ProjectBase.Core;
using $safeprojectname$.Infrastructure.Exceptions;

namespace $safeprojectname$.Infrastructure
{
    public class PublishingReporter : IPublishingReporter
    {
        public virtual void ReportFatal()
        {
            this.PublishFatal("ExceptionMessage", new Exception("MyException"));
            this.PublishFatal(new ChildException("MyException"));
        }
        public virtual void ReportDebug()
        {
            this.PublishDebug("MyMessage {0}", "Debug");
        }
        public virtual void ReportDebugDelegate()
        {
            this.PublishDebug(() => "MyMessage {0} Delegate".FormatWith("Debug"));
        }
        public virtual void ReportInfo()
        {
            this.PublishInfo("MyMessage {0}", "Info");
        }
        public virtual void ReportInfoDelegate()
        {
            this.PublishInfo(() => "MyMessage {0} Delegate".FormatWith("Info"));
        }
        public virtual void ReportWarning()
        {
            this.PublishWarning("MyMessage {0}", "Warning");
        }
        public virtual void ReportWarningDelegate()
        {
            this.PublishWarning(() => "MyMessage {0} Delegate".FormatWith("Warning"));
        }
        public virtual void ReportError()
        {
            this.PublishError("MyMessage {0}", "Error");
        }
        public virtual void ReportErrorDelegate()
        {
            this.PublishError(() => "MyMessage {0} Delegate".FormatWith("Error"));
        }
    }
}
